package com.cetcs.kmga.dataManager.service.sysManager;


import com.cetcs.kmga.common.Data;
import com.cetcs.kmga.common.Page;
import com.cetcs.kmga.dataManager.entity.sysManager.LocalServerInfo;
import com.cetcs.kmga.dataManager.entity.sysManager.SysEmailSerConf;
import com.cetcs.kmga.dataManager.entity.sysManager.vi.SysEmailSerConfVi;
import com.cetcs.kmga.dataManager.entity.sysManager.vo.ServerStatusVo;
import com.cetcs.kmga.dataManager.entity.sysManager.vo.SpaceAccountedVo;

import javax.mail.MessagingException;
import java.io.UnsupportedEncodingException;
import java.util.List;


/**
 * SysManagerService
 * Created by yyangs on 2017/8/30.
 */
public interface SysManagerService {

    //获取本机服务器信息
    public LocalServerInfo getLocalServiceInfo(Data dataMap) throws Exception;

    //更新本机服务器信息
    public Integer updateLocalServiceInfo(Data dataMap) throws Exception;

    //获取服务器状态信息
    public ServerStatusVo getServiceStatus(Data dataMap) throws Exception;

    //获取获取本机的空间占比数据
    public List<SpaceAccountedVo> getLocalSpaceAccounted(Data dataMap) throws Exception;

    //获取清理日志 分页
    public Page getCleanRecordsByPage(Data dataMap) throws Exception;
    //添加清理日志
    public Integer addCleanRecords(Data dataMap) throws Exception;


    /**
     * ==========xutao========start=================
     */
    /**
     * 更新或创建服务配置
     *
     * @param record
     * @return
     */
    int createOrModifySysEmailConfig(SysEmailSerConfVi record);


    /**
     * 查询服务的配置
     *
     * @return
     */
    SysEmailSerConf findSysEmailConfig();

    void reloadSysEmailConf2Cache();

    /**
     * 验证邮箱是否能访问成功
     *
     * @param record
     * @return
     */
    void verifySysEmailSer(SysEmailSerConfVi record) throws UnsupportedEncodingException, MessagingException;
    /**
     * ==========xutao========end=================
     */
}
